package com.mstore.service;

import com.mstore.dao.BalanceOrderInfoDao;
import com.mstore.pojo.BalanceOrderInfo;

public class BalanceOrderInfoService {

	private BalanceOrderInfoDao balanceOrderInfoDao;
	
	/**
	 * 新增
	 */
	public void addBalanceOrderInfo(BalanceOrderInfo balanceOrderInfo) {
		balanceOrderInfoDao.addBalanceOrderInfo(balanceOrderInfo);
	}
	
	/**
	 * 修改状态
	 */
	public void updateForState(String orderId) {
		balanceOrderInfoDao.updateForState(orderId);
	}
	
	/**
	 * 通过orderId查询
	 */
	public BalanceOrderInfo getBalanceOrderInfoByOrderId(String orderId) {
		Object obj = balanceOrderInfoDao.getBalanceOrderInfoByOrderId(orderId);
		return obj != null ? (BalanceOrderInfo) obj : null;
	}

	public BalanceOrderInfoDao getBalanceOrderInfoDao() {
		return balanceOrderInfoDao;
	}

	public void setBalanceOrderInfoDao(BalanceOrderInfoDao balanceOrderInfoDao) {
		this.balanceOrderInfoDao = balanceOrderInfoDao;
	}

}
